<template>
	<view class="guahao">
		<view class="g2" v-for="item in list" @click="tomodify(item.id)">
			<text>姓名：{{item.name}}</text>
			<text>性别：{{item.sex}}</text>
			<text>出生日期：{{item.birthday}}</text>
			<text>身份证：{{item.cardId}}</text>
			<text>地址：{{item.address}}</text>
			<text>电话：{{item.tel}}</text>
		</view>
		<view class="g1">
			<u-icon name="plus" size="80" style="margin-top: 60px; margin-left: 110px;" @click="tonext"></u-icon>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			}
		},
		onLoad() {
			this.getlist()
		},
		methods: {
			tonext(){
				uni.navigateTo({
					url:'/pages/serve/hospital/addquezhen/addquezhen'
				})
			},
			getlist(){
				this.api.get('/prod-api/api/hospital/patient/list').then(res=>{
					this.list=res.data.rows
				})
			},
			tomodify(id){
				uni.navigateTo({
					url:'/pages/serve/hospital/modifyquezhen/modifyquezhen?id='+id
				})
			}
		}
	}
</script>

<style lang="scss">
.g1{
	width: 300px;
	height: 200px;
	margin: 20px auto;
	border: 2px solid #ccc;
	border-radius: 15px;
	
}
.g2{
	width: 300px;
	margin: 20px auto;
	border: 1px solid sandybrown;
	display: flex;
	flex-direction: column;
	line-height: 28px;
}
</style>
